package com.idemon.springbootredismq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.concurrent.CountDownLatch;
@Component
public class Receiver {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private CountDownLatch countDownLatch;

    public void receiveMsg(String msg){
        logger.info("Receive Message ===>" + msg);
        countDownLatch.countDown();
    }
}
